package com.daoeping.data;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Bsc_major entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bsc_major", catalog = "daoeping")
public class Bsc_major implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String description;
	private Set<Bzn_jobdescription> bzn_jobdescriptions = new HashSet<Bzn_jobdescription>(
			0);
	private Set<Usr_education> usr_educations = new HashSet<Usr_education>(0);

	// Constructors

	/** default constructor */
	public Bsc_major() {
	}

	/** full constructor */
	public Bsc_major(String name, String description,
			Set<Bzn_jobdescription> bzn_jobdescriptions,
			Set<Usr_education> usr_educations) {
		this.name = name;
		this.description = description;
		this.bzn_jobdescriptions = bzn_jobdescriptions;
		this.usr_educations = usr_educations;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bsc_major")
	public Set<Bzn_jobdescription> getBzn_jobdescriptions() {
		return this.bzn_jobdescriptions;
	}

	public void setBzn_jobdescriptions(
			Set<Bzn_jobdescription> bzn_jobdescriptions) {
		this.bzn_jobdescriptions = bzn_jobdescriptions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bsc_major")
	public Set<Usr_education> getUsr_educations() {
		return this.usr_educations;
	}

	public void setUsr_educations(Set<Usr_education> usr_educations) {
		this.usr_educations = usr_educations;
	}

}